package edu.sctu.wangfuxin.day20150607;

/**
 * Created by user06 on 2015/6/7.
 */
public class TestThread {
    public void startThread() {
        new Thread() {
            public void run() {
                super.run();
                for (int i = 0; i < 100; i++) {
                    System.out.println(i);
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        }.start();
    }
    public void startTestThreadRable() {
        Thread thread = new Thread(new TestThreadRunable());
        thread.start();
    }
}
